package com.air.ota.service.imp;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.air.common.service.imp.BaseServiceImp;
import com.air.ota.dao.OutboundMsgDao;
import com.air.ota.mo.OutboundMsg;
import com.air.ota.service.IOutboundMsgService;
import com.air.ota.vo.MsgListCacheVO;

@Service("outboundMsgService")
public class OutboundMsgServiceImp extends BaseServiceImp implements
		InitializingBean, IOutboundMsgService {
	
	@Autowired
	OutboundMsgDao outboundMsgMapper;
	
	@Override
	public void afterPropertiesSet() throws Exception {
		this.baseDao = outboundMsgMapper;
	}
	
	@Override
	public <T> T insert(T object) throws Exception{
		T po = super.insert(object);
		MsgListCacheVO.pushOutboundMsg((OutboundMsg)po);
		return po;
	}
	
	
}
